package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.ProduceWasteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RequestMapping("produceWaste")
@RestController
public class ProduceWasteController {
    @Autowired
    private ProduceWasteService produceWasteService;


    /**
     *新增订单
     * @return
     * @throws Exception
     */
    @RequestMapping("addOrder")
    public ResponseParams<?> addOrder() throws Exception {
        return produceWasteService.addOrder();
    }

    /**
     *选择废物
     * @return
     * @throws Exception
     */
    @RequestMapping("chooseWaste")
    public ResponseParams<?> chooseWaste() throws Exception {
        return produceWasteService.chooseWaste();
    }

    /**
     *取消订单
     * @return
     * @throws Exception
     */
    @RequestMapping("cancelOrder")
    public ResponseParams<?> cancelOrder() throws Exception {
        return produceWasteService.cancelOrder();
    }

    /**
     *完结订单
     * @return
     * @throws Exception
     */
    @RequestMapping("endOrder")
    public ResponseParams<?> endOrder() throws Exception {
        return produceWasteService.endOrder();
    }

    /**
     *选择机构
     * @return
     * @throws Exception
     */
    @RequestMapping("chooseOrg")
    public ResponseParams<?> chooseOrg() throws Exception {
        return produceWasteService.chooseOrg();
    }

    /**
     *选择司机
     * @return
     * @throws Exception
     */
    @RequestMapping("chooseDriver")
    public ResponseParams<?> chooseDriver() throws Exception {
        return produceWasteService.chooseDriver();
    }


    /**
     *获取订单明细列表
     * @return
     * @throws Exception
     */
    @RequestMapping("getOrderInfoList")
    public ResponseParams<?> getOrderInfoList() throws Exception {
        return produceWasteService.getOrderInfoList();
    }


}
